/*
  S.M.A.C.K - An operating system kernel
  Copyright (C) 2010,2011 Mattias Holm and Kristian Rietveld
  For licensing and a full list of authors of the kernel, see the files
  COPYING and AUTHORS.
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <syscalls.h>

int
main(int argc, char **argv)
{
  int i;
  int n_proc;
  struct proc_info proc[32];

  get_processes(proc, &n_proc);

  printf("PID\tCPUTIME\n");
  printf("IDLE\t%d\n", proc[0].cpu_time);
  for (i = 1; i < n_proc; i++)
    {
      printf("%d\t%d\n", proc[i].pid, proc[i].cpu_time);
    }

  return 0;
}
